
<template>
    <div class="activity-list-container">
      <!-- 筛选栏 -->
      <div class="filter-bar">
        <div class="search-box">
          <input type="text" placeholder="搜索活动名称">
          <button>🔍</button>
        </div>
        <div class="filter-tabs">
          <span class="active">全部</span>
          <span>进行中</span>
          <span>未开始</span>
          <span>已结束</span>
        </div>
      </div>
  
      <!-- 活动列表 -->
      <div class="activity-items">
        <div v-for="i in 6" :key="i" class="activity-item" 
             @click="$router.push('/activity-detail')">
          <div class="cover-image"></div>
          <div class="info">
            <h3>校园环保志愿活动 {{i}}</h3>
            <div class="meta">
              <span>📅 2025-06-{{10+i}}</span>
              <span>📍 第{{i}}教学楼</span>
            </div>
            <div class="status">
              <span class="tag" :class="i%3===0?'end':i%2===0?'ing':'wait'">
                {{i%3===0?'已结束':i%2===0?'进行中':'未开始'}}
              </span>
              <span>👥 剩余{{15-i}}名额</span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </template>
  
  <style scoped>
  .activity-list-container {
    padding: 10px;
    background: #f5f5f5;
    min-height: 100vh;
  }
  .filter-bar {
    background: white;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
  }
  .search-box {
    display: flex;
    margin-bottom: 10px;
  }
  .search-box input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
  }
  .search-box button {
    padding: 8px 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
  }
  .filter-tabs {
    display: flex;
    gap: 10px;
  }
  .filter-tabs span {
    padding: 5px 10px;
    font-size: 14px;
    color: #666;
  }
  .filter-tabs span.active {
    color: #4CAF50;
    border-bottom: 2px solid #4CAF50;
  }
  .activity-items {
    display: grid;
    gap: 15px;
  }
  .activity-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  .cover-image {
    height: 120px;
    background: #eee;
  }
  .info {
    padding: 10px;
  }
  .meta {
    display: flex;
    gap: 15px;
    margin: 8px 0;
    font-size: 13px;
    color: #666;
  }
  .status {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
  }
  .tag.wait {
    background: #FFF3E0;
    color: #FF9800;
  }
  .tag.ing {
    background: #E8F5E9;
    color: #4CAF50;
  }
  .tag.end {
    background: #F5F5F5;
    color: #9E9E9E;
  }
  </style>
  